package main

import (
	"bytes"
	"encoding/base64"
	"fmt"
)

func Decode(raw []byte) []byte {
	var buf bytes.Buffer
	decoded := make([]byte, 215)
	buf.Write(raw)
	decoder := base64.NewDecoder(base64.StdEncoding, &buf)
	decoder.Read(decoded)
	return decoded
}


func Encode(raw []byte) []byte {
	var encoded bytes.Buffer
	encoder := base64.NewEncoder(base64.StdEncoding, &encoded)
	encoder.Write(raw)
	encoder.Close()
	return encoded.Bytes()
}

func main() {

     bbb := Decode([]byte("eyJ1c2VybmFtZSI6ImFza21lYXRhZG1pbiIsInJvbGUiOiJzdXBlcnVzZXIiLCJwb3J0cmFpdHVybCI6Imh0dHA6Ly9ydW5kZWVwLmYzMzIyLm9yZzoxOTAwMS9zdGF0aWMvaW1nL3N1cGVydXNlci5qcGciLCJleHAiOjE1MTM1ODA2NDV9"))
     fmt.Println(string(bbb[:]))
}


